﻿Imports Control_Vuelos_BL
Imports DevExpress.XtraPrinting

Public Class frmMaestroTrabajadorCuenta
    Inherits frmBaseMantenimiento

    ReadOnly oTrabajadorCuenta As New TrabajadorCuentaBL()
    Public printingSystem1 As New PrintingSystem()
    Public printableComponentLink1 As New PrintableComponentLink()

    Private Sub frmMaestroTrabajadorCuenta_Load(sender As Object, e As System.EventArgs) Handles Me.Load
        BarBtnAgregar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        BarBtnCancelar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        BarBtnEliminar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        BarBtnGrabar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        BarBtnModificar.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
        AddHandler BarBtnRefresh.ItemClick, AddressOf prl_GetTrabajadorCuenta
        AddHandler BarBtnImprimir.ItemClick, AddressOf prl_Imprimir
        prl_GetTrabajadorCuenta()
        printingSystem1.Links.AddRange(New Object() {printableComponentLink1})
        printableComponentLink1.Component = GridControl1
        printableComponentLink1.Landscape = True
    End Sub

    Public Sub prl_GetTrabajadorCuenta()
        GridControl1.DataSource = oTrabajadorCuenta.pr_ListarCentroCostoXTrabajadorResidencia("001")
        GridView1.BestFitColumns()

    End Sub

    Public Sub prl_Imprimir()
        printableComponentLink1.ShowPreview()
    End Sub

End Class